﻿<UserControl x:Class="MenuTester.TestMenu"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:MenuControl"
    xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
    Width="400" Height="300">

    
    
    <Canvas x:Name="LRoot" Background="#FF817C7C">
        
        <local:MenuBar>
            
            <local:MenuBarItem MenuText="File">
                <local:MenuItem MenuText="New"  Click="MenuItem_Click" />
                <local:MenuItem MenuText="Open"  Click="MenuItem_Click" />
                <local:MenuItem MenuText="This is a very long item"  Click="MenuItem_Click">
                    <local:MenuItem MenuText="test1"  Click="MenuItem_Click"/>
                    <local:MenuItem MenuText="test2"  Click="MenuItem_Click"/>
                    <local:MenuItem MenuText="test3"  Click="MenuItem_Click"/>
                </local:MenuItem>
                <local:MenuItem MenuText="Close"  Click="MenuItem_Click"/>
            </local:MenuBarItem>
            
            <local:MenuBarItem MenuText="Edit" >
                <local:MenuItem MenuText="Copy"  Click="MenuItem_Click">
                    <local:MenuItem MenuText="test1"  Click="MenuItem_Click">
                        <local:MenuItem MenuText="test2"  Click="MenuItem_Click">
                            <local:MenuItem MenuText="test1"  Click="MenuItem_Click"/>
                        </local:MenuItem>
                    </local:MenuItem>
                    <local:MenuItem MenuText="test2"  Click="MenuItem_Click"/>
                    <local:MenuItem MenuText="test3"  Click="MenuItem_Click">
                        <local:MenuItem MenuText="test2"  Click="MenuItem_Click"/>                        
                    </local:MenuItem>                       
                </local:MenuItem>                
                <local:MenuItem MenuText="Paste"  Click="MenuItem_Click"/>
            </local:MenuBarItem>
            
            <local:MenuBarItem MenuText="Help" >
                <local:MenuItem MenuText="About"  Click="MenuItem_Click"/>                
            </local:MenuBarItem>
            
        </local:MenuBar>
        
    </Canvas>
</UserControl>
